package com.fpx.open.platform.domain.ae;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

import org.hibernate.validator.constraints.NotEmpty;

public class Order {
    /**
     * 物流运单号
     */
    @NotEmpty
    private String mailNo;
    /**
     * 物流订单号(物流宝系统的订单号)
     */
    @NotEmpty
    private String orderCode;
    /**
     * 备注
     */
    private String remark;
    /**
     * 国内快递公司ID
     */
    private Long domesticExpressId;
    /**
     * 国内快递公司Code
     */
    private String domesticExpressCode;
    /**
     * 国内快递公司名中文简称
     */
    private String domesticExpressName;
    /**
     * 发货人信息
     */
    private ContactPerson sendContact;
    /**
     * 收货人信息
     */
    private ContactPerson receiverContact;
    
    /** 揽收信息 */
    private ContactPerson pickupContact;
    
    @NotNull
    @Valid
    private List<SubOrder> subOrders;
    /**
     * 是否需要揽收 (0:不需要，1: 需要)
     */
    private Integer doorPickup;
    
    /**
     * 业务代码
     * （5000000000010----3PL
	 * 5000000011398----4PL）
     */
    private String serviceItemId;
    /**
     * 扩展字段 (key=value形式)
     */
    private String extendFields;
    
    /** 品类，  00：普货 01： 化妆品 02： 带电 03：纯电 如果有多项，用逗号隔开 */
    private String categoryFeature;
    
    /** 1.	4PL 线上发货  AE_4PL_ONLINE
	 *	2.	无忧物流标准  AE_4PL_STANDARD
	 *	3.	无忧物流优先  AE_4PL_PREMIUM
	 */
    private String bizCode;
    
    /** 退件人信息 add by shiwei 2016-06-20 */
    private ContactPerson refunderContact;
    
    /** 面单打印相关信息 */
    private String cloudPrintData;
    
    /** 订单创建时间 */
    private String orderCreateTime;
    
    /** 0代表正常操作，1拆箱拍照，2代表将包裹寄到指定定点（后续会开放） */
    private Integer parcelInspect;

    /**
	 * @return the categoryFeature
	 */
	public String getCategoryFeature() {
		return categoryFeature;
	}

	/**
	 * @param categoryFeature the categoryFeature to set
	 */
	public void setCategoryFeature(String categoryFeature) {
		this.categoryFeature = categoryFeature;
	}

	public String getMailNo() {
        return mailNo;
    }

    public void setMailNo(String mailNo) {
        this.mailNo = mailNo;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getDomesticExpressId() {
        return domesticExpressId;
    }

    public void setDomesticExpressId(Long domesticExpressId) {
        this.domesticExpressId = domesticExpressId;
    }

    public String getDomesticExpressCode() {
        return domesticExpressCode;
    }

    public void setDomesticExpressCode(String domesticExpressCode) {
        this.domesticExpressCode = domesticExpressCode;
    }

    public ContactPerson getSendContact() {
        return sendContact;
    }

    public void setSendContact(ContactPerson sendContact) {
        this.sendContact = sendContact;
    }

    public ContactPerson getReceiverContact() {
        return receiverContact;
    }

    public void setReceiverContact(ContactPerson receiverContact) {
        this.receiverContact = receiverContact;
    }

    @XmlElementWrapper(name="subOrders")
    @XmlElement(name="subOrder")
    public List<SubOrder> getSubOrders() {
        return subOrders;
    }

    public void setSubOrders(List<SubOrder> subOrders) {
        this.subOrders = subOrders;
    }

    public String getDomesticExpressName() {
        return domesticExpressName;
    }

    public void setDomesticExpressName(String domesticExpressName) {
        this.domesticExpressName = domesticExpressName;
    }
    
    public Integer getDoorPickup() {
        return doorPickup;
    }

    public void setDoorPickup(Integer doorPickup) {
        this.doorPickup = doorPickup;
    }

    @Override
    public String toString() {
        return "Order [mailNo=" + mailNo + ", orderCode=" + orderCode + ", remark=" + remark + ", domesticExpressId="
                + domesticExpressId + ", domesticExpressCode=" + domesticExpressCode + ", domesticExpressName="
                + domesticExpressName + ", sendContact=" + sendContact + ", receiverContact=" + receiverContact
                + ", subOrders=" + subOrders + ", doorPickup=" + doorPickup + "]";
    }

	public String getServiceItemId() {
		return serviceItemId;
	}

	public void setServiceItemId(String serviceItemId) {
		this.serviceItemId = serviceItemId;
	}

	public ContactPerson getPickupContact() {
		return pickupContact;
	}

	public void setPickupContact(ContactPerson pickupContact) {
		this.pickupContact = pickupContact;
	}

    public String getExtendFields() {
        return extendFields;
    }

    public void setExtendFields(String extendFields) {
        this.extendFields = extendFields;
    }

	/**
	 * @return the bizCode
	 */
	public String getBizCode() {
		return bizCode;
	}

	/**
	 * @param bizCode the bizCode to set
	 */
	public void setBizCode(String bizCode) {
		this.bizCode = bizCode;
	}

	/**
	 * @return the refunderContact
	 */
	public ContactPerson getRefunderContact() {
		return refunderContact;
	}

	/**
	 * @param refunderContact the refunderContact to set
	 */
	public void setRefunderContact(ContactPerson refunderContact) {
		this.refunderContact = refunderContact;
	}

	/**
	 * @return the cloudPrintData
	 */
	public String getCloudPrintData() {
		return cloudPrintData;
	}

	/**
	 * @param cloudPrintData the cloudPrintData to set
	 */
	public void setCloudPrintData(String cloudPrintData) {
		this.cloudPrintData = cloudPrintData;
	}

	/**
	 * @return the orderCreateTime
	 */
	public String getOrderCreateTime() {
		return orderCreateTime;
	}

	/**
	 * @param orderCreateTime the orderCreateTime to set
	 */
	public void setOrderCreateTime(String orderCreateTime) {
		this.orderCreateTime = orderCreateTime;
	}

	/**
	 * @return the parcelInspect
	 */
	public Integer getParcelInspect() {
		return parcelInspect;
	}

	/**
	 * @param parcelInspect the parcelInspect to set
	 */
	public void setParcelInspect(Integer parcelInspect) {
		this.parcelInspect = parcelInspect;
	}

}
